﻿@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <title>Update</title>
    <script src="../../Scripts/PageCreater/Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
    <script src="../../Scripts/PageCreater/Scripts/PageCreater.js" type="text/javascript"></script>
    <link href="../../Scripts/PageCreater/Css/Style.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/PageCreater/Calendar/WdatePicker.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $.ajaxSetup({ cache: false });
            var str = "StartTime,开始时间,false,text|date,notnull,"
                        + "StopTime,结束时间,false,text|date,notnull,"
                        + "Remark,备注,false,text,notnull,"
                        + "IsActive,状态,false,select|激活!true|注销!false,notnull,"
                        + "Opreate,操作,false,null,null";
            CreatePageFramWithValue(str, "/SetQuestionTask/GetTaskByID");
            $.getJSON("/SetQuestionTask/GetTaskByID", { id: getUrlPara() }, function (json) {
                $("#spCourseName").append(json.CourseName);
            });
        })
        function SubmitPage() {
            if (!InitValidator()) {
                return false;
            }
            $.ajax({
                type: "Post",
                url: "/Role/Update",
                data: { id: getUrlPara(), roleName: $("#RoleName").val(), isActive: $("#IsActive").val(), selectedIds: selectIDs },
                success: function () {
                    alert("修改成功！");
                    window.location = "/Role/Index";
                }
            });
        }
    </script>
</head>
<body>
    <div class="Content">
        <p>
            @Html.ActionLink("返回列表", "Index")
        </p>
        <form method="post" id="Info">
            <input id="btnSubmit" type="button" value="保存" class="btn3" onclick="SubmitPage()" /><br /><br />
        <fieldset>
            <legend>请输入基本信息</legend>
            <table>
                <tr>
                    <td>
                        课程名称
                    </td>
                    <td>
                        <span style="color: Red" id="spCourseName"></span>
                    </td>
                </tr>
            </table>
            <div id="divContent">
            </div>
        </fieldset>
        </form>
    </div>
</body>
</html>
